<?php session_start(); 
ob_start();
?>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" href="public/CSS/works.css" type="text/css"/>
        <title></title>
    </head>
    <body>
        <h1 align="center" style="margin-top: 82px">WORKS</h1>

     <?php
        require_once './model/works.php';
        $worker = new Work();
        $work = $worker->select_edit(NULL, $_GET['id']);
        ?>
        <form  action="view.php?id=<?php echo $_GET["id"] ?>" method="post" enctype="multipart/form-data">
            <table align="center">
                <tr>
                    <th>Tên Công Việc</th>
                    <td><?php echo $work["name"] ?></td>
                </tr>
                <tr>
                    <th>Ngày Đăng</th>
                    <td><?php $mydate = getdate($work['posted']); ?> 
                        <?php echo "$mydate[mday] $mydate[month], $mydate[year]"; ?></td>
                </tr>
                <tr>
                    <th>Làm Việc Tại</th>
                    <td><?php echo $work["location"] ?></td>
                </tr>
                <tr>
                    <th>Tên Công Ty</th>
                    <td><?php echo $work["company_name"] ?></td>
                </tr>
                <tr>
                    <th>Địa Chỉ</th>
                    <td><?php echo $work["company_address"] ?></td>
                </tr>
                <tr>
                    <th>Mô Tả Công Việc</th>
                    <td><?php echo $work["description"] ?></td>
                </tr>
                <tr>
                    <th>Điều Kiện</th>
                    <td><?php echo $work["experience_requirements"] ?></td>
                </tr>
                <tr>
                    <th>Liên Hệ</th>
                    <td><?php echo $work["company_profile"] ?></td>
                </tr>
                <tr>
                    <th>Hình Ảnh</th>
                    <td><img src="<?php echo $work['image'] ?>" width="100px" height="100px"></td>
                </tr>
            </table>
        </form>
        <a href='index.php'><?php echo "Prev" ?></a>
    </body>
</html>
